import HTMLTestRunner_PY3
import yagmail
class Tools:
    def Report(self):
        report=HTMLTestRunner_PY3.HTMLTestRunner(open('hzy.html','wb'),
                                                 title='测试报告',
                                                 description='这是一份测试报告')
        return  report

    def send(self):
        email=yagmail.SMTP(user='103214030@qq.com',
                          password='izrcohljnjukbgic',
                          host='smtp.qq.com',
                          port=465)
        email.send(to='103214030@qq.com',
                  subject='测试报告',
                  contents=['测试报告','hzy.html'])
        email.close()
        print(email)